FROM openjdk:8
WORKDIR /app/etc/
LABEL USER=PIPELINE

#jar
ENV JARNAME=nw-devops-pipeline-artifact-1.0.0-SNAPSHOT.jar

COPY ${JARNAME} /app/lib/${JARNAME}
COPY application.yml /app/etc/application.yml
COPY startup.sh /app/bin/startup.sh

RUN chmod +x /app/bin/startup.sh
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

ENTRYPOINT ["sh","/app/bin/startup.sh"]
